package vista;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vLista extends javax.swing.JFrame {
	private JScrollPane scModelo;
	private JLabel lbltitulo;
	private JButton btnsalir;
	private JTable tabla;
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				vLista inst = new vLista();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public vLista() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			getContentPane().setLayout(null);
			this.setTitle("Listados");
			{
				scModelo = new JScrollPane();
				getContentPane().add(scModelo);
				scModelo.setBounds(30, 112, 490, 239);
				{
					tabla = new JTable();
					scModelo.setViewportView(tabla );
				}
			}
			{
				btnsalir = new JButton();
				getContentPane().add(btnsalir);
				btnsalir.setText("Salir");
				btnsalir.setBounds(441, 427, 94, 23);
			}
			{
				lbltitulo = new JLabel();
				getContentPane().add(lbltitulo);
				lbltitulo.setText("Titulo");
				lbltitulo.setBounds(158, 64, 218, 21);
			}
			pack();
			this.setSize(572, 514);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public JLabel getlabel()
	{
		return lbltitulo;
	}

	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	public void setResultados(AbstractTableModel abstractTableModel) {
	tabla.setModel(abstractTableModel);
	}
	public void addListener(ActionListener actionListener) 
	{
		btnsalir.addActionListener(actionListener);
	}
}
